|
|
|
|
|
|
|
Figure 7.9
Program MFilter uses a mask to restrict a filter to certain areas. |
|
|
|
|
|
|
|
|
Summary of Spatial Filters |
|
|
|
|
|
|
|
|
The spatial filters described here use only a tiny fraction of the possible combinations of kernel coefficients. You can use the Filter program's define Custom Filter command to experiment with kernels of your own. Below are a few hints to help you on your way: |
|
|
|
|
|
|
|
|
Positive numbers in the center of the kernel reinforce the pixel's current value. |
|
|
|
|
|
|
|
|
Negative numbers outside the center emphasize changing pixel values. |
|
|
|
|
|
|
|
|
Asymmetric kernels produce asymmetric results. |
|
|
|
|
|
|
|
|
If the sum of the kernel's coefficients is 1, the resulting image has roughly the same brightness as the original. If the sum is greater than 1, the result is brighter. If the sum is less than 1, the result is darker. |
|
|
|
|
|
|
|
|
If the sum of the kernel coefficients is zero, the resulting image is very dark, possibly with bright highlights. |
|
|
|
|
|
|
|
|
The filters discussed so far multiply pixel values and kernel coefficients to obtain new pixel values. Because these calculations use only linear (constant) multiples of the pixel values, this sort of operation is called a linear operation. |
|
|
|
|
|